const webpack = require('webpack');
const path = require('path');

const SRC_PATH = __dirname + '/web-src';
const DIST_PATH = __dirname + '/web';

module.exports = {
    entry: {
        'test': SRC_PATH + '/assets/test.js',
    },
    output: {
        filename: 'assets/[name].bundle.js',
        path: DIST_PATH,
    },
    plugins: [
        new webpack.ProvidePlugin({
            $: 'jquery',
            jQuery: 'jquery',
        }),
    ],
    module: {
        rules: [
            {
                test: /\.(png|jpg|svg|gif|svg|eot|ttf|woff|woff2|otf)\??$/,
                use: [
                    {
                        loader: 'file-loader'
                    }
                ]
            },
        ]
    },
};